package com.lmf.filter;

import javax.servlet.*;
import java.io.IOException;

public class UserFilter implements Filter {

    //初始化方法
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    //过滤方法
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        //过滤请求
        System.out.println("UserFilter.......doFilter.......");
        //放行
        filterChain.doFilter(servletRequest,servletResponse);
    }

    //销毁方法
    @Override
    public void destroy() {

    }
}
